package com.tgr.component.ui.calendar
{
	public class EntryForDailyCalendar
	{
		private var entry:BasicScheduleCanvasEntry;
		
		public function EntryForDailyCalendar(entry:BasicScheduleCanvasEntry)
		{
			this.entry = entry;
		}
		
		public function get startHours():Number
		{
			return Math.floor(entry.relativeTopEdgeRatio * 24);
		}
		
		public function get startMinutes():Number
		{
			var mins:Number = Math.round( entry.relativeTopEdgeRatio * 24 * 60 - startHours * 60 ); 
			return mins<60?mins:59;//bug fix to correct "rough edges"
		}
		
		public function get endHours():Number
		{
			return Math.floor(entry.relativeBottomEdgeRatio * 24);
		}
		
		public function get endMinutes():Number
		{
			var mins:Number = Math.round( entry.relativeBottomEdgeRatio * 24 * 60 - endHours * 60 ); 
			return mins<60?mins:59;//bug fix to correct "rough edges"
		}
	}
}